// Copyright 2011 Jefferson Willian
// willmont7@gmail.com

#include <cstdio>

int main() {
  double alcool;
  double gas;
  double ralcool;
  double rgas;

  scanf("%lf%lf%lf%lf", &alcool, &gas, &ralcool, &rgas);

  if (rgas/gas >= ralcool/alcool)
    printf("G\n");
  else
    printf("A\n");

  return 0;
}
